blob: cd2bd97929ea7de7d1281e5a85398b6e1b1ea3b0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import { auth, post } from "$lib/utils";
import { redirect } from "@sveltejs/kit";
export const actions = {
default: async ({ cookies, locals, params }) => {
const { user } = locals;
if (user) {
await post("/redeem", params, auth(cookies));
redirect(307, "/payments");
}
redirect(307, "/register");
},
};
|